#include ".\lib\sprite.h"
#include ".\lib\rtc.h"
#include ".\lib\ints.h"
#include "game.h"
	
/** @defgroup setup Setup
 * @{
 *
 * Install/reeinstall handlers, initialize game
 */
	
/**
* Variables that are related to the irq handler installing
*/
__dpmi_meminfo mem_map;
_go32_dpmi_seginfo old_rtc, old_kbd_irq, old_timer_irq, old_mouse_irq;
void handler(void);				//handler function of the keyboard
void mouse_handler(void);		//handler function of the mouse


/**
 * Does the installation ofthe TIMER0 interrupts
 */
void timer_setup();

/**
 * Does the installation of the mouse and keyboard interrupts
 */
void kbd_and_mouse_init();

/**
 * Does the installation of the RTC interrupts
  */
void rtc_setup();

/**
 * Handler to rtc interrupts
 */
void rtc_isr(); 

/**
 * Does the installation of all the interrupts and initializes the game variables
 */
void init();


/**
 * Reinstalls the keyboard and mouse interrupts
  */
void kbd_and_mouse_finish();

/**
 * Reinstalls the rtc interrupts
  */
void rtc_finish();

/**
 * Reinstalls the TIMER0 interrupts
  */
void timer_finish();

/**
 * reinstall all the interrupts that where installed before
 */
void finalize();

/** @} end of setup */ 